package com.gf.snoopy.constants.enumc;

public enum TemplateType {
	SH(0,"上海中登"),
	SZ(1,"深圳中登"),
	SUB_SH(2,"上海中登(子)"),
	SUB_SZ(3,"深圳中登(子)");	
	
	private Integer code;
	
	private String desc;
	
	private TemplateType(Integer code, String desc){
		this.setCode(code);
		this.setDesc(desc);
	}
	
	public static TemplateType parse(Integer code){
		for(TemplateType type:TemplateType.values()){
			if(type.getCode().equals(code)){
				return type;
			}
		}
		return null;
	}
	

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}
